package cz.muni.fi.pa165.sme.api;

import java.util.List;

import cz.muni.fi.pa165.sme.api.to.BurnedCaloriesTO;
import cz.muni.fi.pa165.sme.api.to.SportActivityTO;

/**
 *
 * The interface for operation with {@link BurnedCaloriesTO}
 * 
 * @author Amruz
 */
  public interface BurnedCaloriesService {

	/**
	 * Adds a new {@link BurnedCaloriesTO} to a storage, creates its ID. Object's ID must be null.
	 *
	 * @param burnedCalories {@link BurnedCaloriesTO} to be created.
	 */
	void createBurnedCalories(final BurnedCaloriesTO burnedCalories);

	/**
	 * Removes a {@link BurnedCaloriesTO} object from a storage. Object's ID must not be null.
	 *
	 * @param burnedCalories {@link BurnedCaloriesTO} to be removed.
	 */
	void deleteBurnedCalories(final BurnedCaloriesTO burnedCalories);

	/**
	 * Updates a {@link BurnedCaloriesTO} object as requested. Object's ID must not be null; parameters can be
	 * changed to null where applicable.
	 *
	 * @param burnedCalories {@link BurnedCaloriesTO} to be updated
	 */
	void updateBurnedCalories(final BurnedCaloriesTO burnedCalories);

	/**
	 * Finds a {@link BurnedCaloriesTO} object by its ID.
	 *
	 * @param id ID to be looked up in the storage
	 * @return {@link BurnedCaloriesTO} with the provided ID, or null if none found
	 */
	BurnedCaloriesTO findBurnedCalories(final Long id);

	/**
	 * Finds all {@link BurnedCaloriesTO}s which are higher than calories.
	 *
	 * @param calories CALORIES to get the data for; must not be null
	 * @return list of all related {@link BurnedCaloriesTO}s; never null.
	 */
	List<BurnedCaloriesTO> findBurnedCaloriesHigherThenCalories(final Long calories);

	/**
	 * Finds all {@link BurnedCaloriesTO}s related to the provided {@link SportActivityTO}.
	 *
	 * @param sportActivity {@link SportActivityTO} object to get the data for; must not be null
	 * @return list of all related {@link BurnedCaloriesTO}s; never null
	 */
	List<BurnedCaloriesTO> findAllBurnedCaloriesBySportActivity(final SportActivityTO sportActivity);

	/**
	 * Returns all {@link BurnedCaloriesTO}s from the storage.
	 *
	 * @return list of all {@link BurnedCaloriesTO}s; never null.
	 */
	List<BurnedCaloriesTO> findAllBurnedCalories();

	/**
	 * Returns true if the provided {@link BurnedCaloriesTO} is found in the storage by id. If the object's id is null, false is returned.
	 * Provided input must not be null.
	 * @param burnedCaloriesTO object to be checked for existnce
	 * @return true if found, false otherwise
	 */
	boolean exists(final BurnedCaloriesTO burnedCaloriesTO);
}
  
